package mvc.importer.impl;

import java.io.File;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

import mvc.gui.IFileChooser;
import mvc.gui.impl.LocalFileChooser;
import mvc.importer.IImporter;

public class LocalFileImporter implements IImporter {
	private IFileChooser fc;

	public LocalFileImporter() {
	}

	public List<File> getFiles() {
		List<String> afe = new LinkedList<String>();
		for (String s : javax.imageio.ImageIO.getReaderFileSuffixes()) {
			afe.add(s);
		}
		fc = new LocalFileChooser(LocalFileChooser.DialogType.OPEN_DIALOG, afe);
		if (fc.showFileChooser()) {
			return fc.getFiles();
		} else {
			return new ArrayList<File>();
		}
	}

}
